<?php
/**
 * Created by PhpStorm.
 * User: jocky
 * Date: 30/08/2017
 * Time: 15:44
 */
namespace backend\models;

use yii\base\Model;

class OnlyCaptchaValidate extends Model
{
    public $controller;//控制器
    public $captcha;
    public $cellphone;

    public function rules()
    {
        $rules = [
            ['captcha', 'required', 'message' => '验证码不能为空'],
            ['captcha', 'captcha', 'captchaAction' => '' . $this->controller . '/captcha', 'message' => '验证码不正确']
        ];

        return $rules;
    }
}